package zuoye;

import java.util.Scanner;

public class 测试类2 {
    public static void main(String[] args) {
        Store re=new Store();
        Animal a=null;
        Scanner input=new Scanner(System.in);
        System.out.println("请选择你要的宠物");
        System.out.println("1.猫 2.狗 3.猪");
        int e=input.nextInt();
        if (e==1){
            a=new Cat();
            re.get(a.shout());
            System.out.println(re.choice);
        }else if (e==2){
            a=new Dog();
            re.get(a.shout());
            System.out.println(re.choice);
        }else {
            a=new Pig();
            re.get(a.shout());
            System.out.println(re.choice);
        }


    }



}
